package com.ruangong.GitClient.app;

import com.ruangong.GitClient.HunHePanAPI.MovieLink;
import com.ruangong.GitClient.HunHePanAPI.Test2;

import java.util.List;

public class test {
    public static void main(String[] args) throws Exception {
        String query = "High School Musical";
        String apiResponse = Test2.fetchFromApi(query);
        System.out.println(apiResponse);
        List<MovieLink> movieLinks = Test2.getResult(query);
        if (movieLinks == null || movieLinks.isEmpty()) System.out.println("error");
        assert movieLinks != null;
        for (MovieLink link : movieLinks) {
            System.out.println("Disk Type: " + link.getDiskType() + ", Link: " + link.getLink());
        }
    }
}
